package cn.com.chengmandian.bike.mapper;

import cn.com.chengmandian.bike.dto.MemberCouponDto;
import cn.com.chengmandian.bike.model.EbMemberCoupon;
import cn.com.chengmandian.bike.model.vo.MemberCouponVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 电单车运营-用户优惠券表 Mapper 接口
 * </p>
 *
 * @author AutoGenerator
 * @since 2021-12-15
 */
@Mapper
public interface EbMemberCouponMapper extends BaseMapper<EbMemberCoupon> {

    IPage<MemberCouponVo> selectCouponList(Page<Object> page, @Param("memberCoupon") MemberCouponDto memberCouponDto, @Param("memberId") Integer memberId);

    List<MemberCouponVo> selectCouponList(@Param("memberCoupon") MemberCouponDto memberCouponDto, @Param("memberId") Integer memberId);

    MemberCouponVo fetchAvailableCoupon(@Param("areaId") Integer areaId, @Param("memberId") Integer memberId, @Param("infoType") Integer infoType, @Param("thresholdMoney") BigDecimal thresholdMoney);

    MemberCouponVo getByCouponDetail(@Param("couponRecordId") Integer couponRecordId);
}
